package com.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.demo.model.RestfulResult;
import com.demo.service.AlarmService;
import com.wordnik.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/alarm")
public class AlarmController {
	private static final Logger logger = LoggerFactory.getLogger(AlarmController.class);

	@Autowired
	private AlarmService alarmService;

	@ResponseBody
	@RequestMapping(value = "/list", method = { RequestMethod.POST })
	@ApiOperation(value = "列出告警", httpMethod = "POST", response = RestfulResult.class, notes = "alarm list")
	public RestfulResult list(@RequestParam(value = "uuid", required = false) String uuid) {
		logger.debug("列出告警调用啦！！");
		return alarmService.list(uuid);
	}

}
